home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mgr / sparcmgr / doc.zoo / doc / usrman / doc.2 < prev    next >
Encoding:
Text File  |  1989-03-28  |  19.1 KB  |  886 lines

  1. '\"                        Copyright (c) 1988 Bellcore
  2. '\"                            All Rights Reserved
  3. '\"       Permission is granted to copy or use this program, EXCEPT that it
  4. '\"       may not be sold for profit, the copyright notice must be reproduced
  5. '\"       on copies, and credit should be given to Bellcore where it is due.
  6. '\"       BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM.
  7. '\"
  8. '\"    $Header: doc.2,v 4.1 88/06/29 17:04:51 bianchi Exp $
  9. '\"    $Source: /tmp/mgrsrc/doc/usrman/RCS/doc.2,v $
  10. .Sh page Macros
  11. All of the C library interface macros expand into
  12. .I printf
  13. expressions that convert their command specification 
  14. into the \*M stream protocol.
  15. Compile time and run time options are available that globally alter
  16. the behavior of these macros to the specific needs of the client program.
  17. The options are detailed in the
  18. .I "Using the Library"
  19. section of this document. 
  20. The returned value of the macro expressions are not meaningful.
  21. The macros described here attempt to reflect the actual state of the system,
  22. and may include some inconsistencies that should be cleaned up in
  23. future releases of the software.
  24. Every \*M command
  25. (a command identifier - argument count combination) that is accepted by \*M has
  26. a macro describing its function.
  27. .LP
  28. .Fh m_addchar
  29. .Fs m_addchar 3 "Insert a space character"
  30. Inserts a space character at the current character cursor position.
  31. The remaining characters on the line, if any, are shifted to the right.
  32. .Fe
  33. .Fh m_addchars n
  34. .Fs m_addchars 3 "Insert some space characters"
  35. Inserts
  36. .Fi n
  37. space characters at the current character cursor position.
  38. The remaining characters on the line, if any, are shifted to the right.
  39. .Fe
  40. .Fh m_addline
  41. .Fs m_addline 3 "Insert a blank line"
  42. Inserts a
  43. blank line at current row. The current row, and any below it,
  44. are shifted down one line.
  45. The bottom line of text is scrolled off the window.
  46. .Fe
  47. .Fh m_addlines n 
  48. .Fs m_addlines 3 "Insert some blank lines"
  49. Inserts
  50. .Fi n
  51. blank lines at current row. The current row, and any below it
  52. are shifted down.
  53. The bottom 
  54. .Fi n
  55. lines of text are scrolled off the window.
  56. It is much more efficient to call
  57. .Fr m_addlines n 
  58.  once, than it is to call
  59. .Fr m_addline
  60. .Fi n
  61. times.
  62. .Fe
  63. .Fh m_aligntext
  64. .Fs m_aligntext 13 "Align character cursor with the graphics point"
  65. Moves the current character cursor coincident
  66. with the current graphics point.
  67. The current graphics point is set with 
  68. .Fr m_go x  y  
  69. \&.
  70. This permits client programs to position characters at arbitrary pixel
  71. locations on the window.
  72. .Fe
  73. .Fh m_arc x  y  x1  y1  x2  y2 
  74. .Fs m_arc 4 "Draw an arc"
  75. An arc centered at
  76. .Fr "" x y
  77. is drawn counter clockwise from 
  78. .Fr "" x1 y1
  79. to
  80. .Fr "" x2 y2
  81. using the current drawing function (see
  82. .Fr m_func
  83. ).
  84. .Fe
  85. .Fh m_bell
  86. .Fs m_bell 1 "Flash the window and ring the bell"
  87. The window flashes and the bell, if there is one, rings.
  88. Even if the window is totally obscured, its flashing is made visible
  89. to the user.
  90. .Fe
  91. .Fh m_bcolor color
  92. .Fs m_bcolor 14 "Set the text background color"
  93. The background color for text operations is set to
  94. .Fi color ,
  95. which is an index into the color lookup table.
  96. This command is ignored on a monochrome display.
  97. See also 
  98. .Fr m_fcolor
  99. and
  100. .Fr m_linecolor
  101. \&.
  102. .Fe
  103. .Fh m_bitcopy x_dst  y_dst  wide  high  x_src  y_src 
  104. .Fs m_bitcopy 5 "Bit-blt a rectangle within the window"
  105. Copy a rectangle from one place on the window to another
  106. with the copy function set by
  107. .Fr  m_func n
  108. \&. 
  109. The rectangular area at
  110. .Fi  x_src , y_src
  111. of size
  112. .Fi wide
  113. by
  114. .Fi high
  115. is combined with
  116. the rectangle at
  117. .Fi x_dst , y_dst
  118. according to the last function set by
  119. .Fr m_func
  120. \&.
  121. The resultant rectangle is placed at
  122. .Fi x_dst , y_dst .
  123. .Fe
  124. .Fh m_bitcopyto x_dst  y_dst wide  high  x_src  y_src  to  from 
  125. .Fs m_bitcopyto 5 "Bit-blt a rectangle between two bitmaps"
  126. Combine the rectangle at position
  127. .Fi x_src , y_src
  128. of size
  129. .Fi wide
  130. by
  131. .Fi high
  132. of bitmap
  133. .Fi from
  134. with the rectangle of the same size at
  135. .Fi x_dst , y_dst
  136. of bitmap
  137. .Fi to .
  138. The bit-blt function used to combine the two rectangles is set by
  139. .Fr m_func
  140. \&.
  141. .Fi From
  142. and
  143. .Fi to
  144. are scratch-pad bitmap descriptors.
  145. Scratchpad bitmap 0 (zero) represents the current window contents and may
  146. be used for the 
  147. source , destination
  148. or both.
  149. If the scratchpad bitmap
  150. .Fi to
  151. does not already exist, it is created with a size of 
  152. .Fi wide + x_src
  153. by
  154. .Fi high + y_src .
  155. .Fe
  156. .Fh m_bitcreate  n  wide  high 
  157. .Fs m_bitcreate 5 "Create a scratchpad bitmap"
  158. Create the scratchpad bitmap
  159. .Fi n
  160. of size
  161. .Fi wide
  162. by
  163. .Fi high .
  164. The contents of the bitmap are undefined.
  165. The macro
  166. .Fr m_bitwriteto
  167.  can be used to initialize the scratchpad bitmap.
  168. If the bitmap already exists, the old one is first discarded.
  169. Scratchpad bitmaps may also be created implicitly
  170. by specifying a non-existent bitmap as the destination of
  171. .Fr m_bitwriteto 
  172. ,
  173. .Fr m_bitcopyto 
  174. ,
  175. .Fr m_bitld 
  176. , or 
  177. .Fr m_stringto
  178. \&.
  179. .Fe
  180. .Fh m_bitdestroy n 
  181. .Fs m_bitdestroy 5 "Destroy a scratchpad bitmap"
  182. Destroys scratchpad bitmap
  183. .Fi n
  184. and frees all the resources 
  185. associated with it.
  186. If
  187. .Fi n
  188. does not exist, this macro is ignored.
  189. .Fe
  190. .Fh m_bitfromfile to  name 
  191. .Fs m_bitfromfile 5 "Read a bitmap file into a scratchpad bitmap"
  192. Copy the file
  193. .Fi name
  194. on the
  195. .I \*M-host
  196. machine into the scratchpad bitmap
  197. .Fi to .
  198. The scratchpad bitmap
  199. .Fi to
  200. is created if it does not already exist.
  201. .B \*M
  202. returns  a single line containing the
  203. .I width
  204. and
  205. .I height
  206. of the bitmap,
  207. or a 
  208. .I blank
  209. if the file could not be found or loaded.
  210. If 
  211. .Fi name
  212. does not start with
  213. .B /
  214. or
  215. .B ./ ,
  216. The file
  217. .Fi name
  218. is prefixed
  219. with \*M's home directory and
  220. .I /icon/ .
  221. .Fi Name s
  222. starting with 
  223. .B ./
  224. are evaluated relative to the directory current when 
  225. .B \*M
  226. was invoked.
  227. The format of the bitmap file is described in 
  228. .I dump.h .
  229. .Fe
  230. .Fh m_bitget from  size  offset 
  231. .Fs m_bitget 5 "Upload a bitmap to the client program"
  232. Upload part of a
  233. .I scratchpad
  234. bitmap.
  235. .Fi Size
  236. bytes of
  237. .I scratchpad
  238. bitmap
  239. .Fi from ,
  240. starting
  241. .Fi offset
  242. bytes from the beginning of the bitmap
  243. are sent to the client program from
  244. .B \*M.
  245. After this call, the client 
  246. is expected to read
  247. .Fi size
  248. bytes from the input stream.
  249. The image data is sent in raster scan order, 8 pixels
  250. to a byte, padded at the right of every line to 16 bits.
  251. .Fi Size
  252. should be kept small (about 80 bytes), to avoid potential
  253. flow control problems, with bitmaps uploaded in
  254. multiple passes. (See also
  255. .Fr m_bitsave 
  256. ).
  257. The data sent by \*M
  258. for this macro
  259. requires an eight bit data channel, so its use is discouraged.
  260. The macro
  261. .Fr m_bitfromfile
  262.  should be used instead when possible.
  263. .Fe
  264. .Fh m_bitld  wide  high  x  y  size 
  265. .Fs m_bitld 5 "Download an image to the window"
  266. Prepare \*M to download a bitmap to the window.
  267. This macro instructs \*M
  268. that the next
  269. .Fi size
  270. bytes received will be interpreted as
  271. a bitmap image to be displayed on the window starting
  272. at location
  273. .Fr "" x y
  274. , and of size
  275. .Fi  wide
  276. by
  277. .Fi high .
  278. Downloading bitmaps requires an eight bit channel between \*M
  279. and the client program.
  280. Large bitmaps are best sent in several pieces.
  281. The macro
  282. .Fr m_bitfromfile
  283. should be used instead, where possible, as it only requires a seven bit
  284. data channel
  285. and avoids the movement of large amounts of data through the channel.
  286. If more bytes are specified than required by the size of the bitmap,
  287. they are discarded.
  288. If the number specified by
  289. .Fi size
  290. is insufficient to fill the entire bitmap, the remainder of the bits
  291. are set to undetermined values.
  292. .Fe
  293. .Fh m_bitldto wide  high  x_dst  y_dst  to  size 
  294. .Fs m_bitldto 5 "Down load an image to a scratchpad bitmap"
  295. Prepare to download a bitmap to the scratchpad bitmap
  296. .Fi to .
  297. If
  298. .Fi to
  299. does not already exist, (see
  300. .Fr  m_bitcreate
  301. ),
  302. it is
  303. created automatically with size
  304. .Fi wide
  305. by
  306. .Fi high .
  307. This function instructs \*M that the next
  308. .Fi size
  309. bytes received will be interpreted as
  310. a bitmap image to be copied to scratchpad bitmap
  311. .Fi to
  312. at location
  313. .Fi  x_dst , y_dst .
  314. This function requires an eight bit channel between \*M
  315. and the client program.
  316. If more bytes are specified than required by the size of the bitmap,
  317. they are discarded.
  318. If the number specified by
  319. .Fi size
  320. is insufficient to fill the entire bitmap, the remainder of the bits
  321. are set to undetermined values.
  322. .Fe
  323. .Fh m_bitsave from  name 
  324. .Fs m_bitsave 5 "Copy a scratchpad bitmap to a file"
  325. Save a scratchpad bitmap
  326. .Fi from
  327. on the file
  328. .Fi name
  329. on the
  330. .I \*M-host
  331. file system.
  332. If 
  333. .Fi name
  334. does not start with
  335. .B /
  336. or
  337. .B ./ ,
  338. .Fi name
  339. is prefixed
  340. with \*M's home directory and
  341. .I /icon/ .
  342. .Fi Name s
  343. starting with 
  344. .B ./
  345. are evaluated relative to the directory current when 
  346. .B \*M
  347. was invoked.
  348. Specifying
  349. .Fi from
  350. to be
  351. .Fi 0
  352. (zero)
  353. saves the entire display contents to the file.
  354. The functions
  355. .Fr m_windowsave
  356.  and
  357. .Fr  m_othersave
  358.  are used to save contents of entire windows.
  359. .Fe
  360. .Fh m_bitwrite x_dst  y_dst  wide  high 
  361. .Fs m_bitwrite 5 "Set, Clear or Invert a rectangular portion of the window"
  362. The rectangular region of the window,
  363. starting at
  364. .Fi x_dst , y_dst
  365. of extent
  366. .Fi wide
  367. by
  368. .Fi high ,
  369. is
  370. set, cleared or inverted
  371. as determined by the previous call to 
  372. .Fr m_func
  373. \&.
  374. .fE
  375. .Fh m_bitwriteto x_dst  y_dst  wide  high  to 
  376. .Fs m_bitwriteto 5 "Set, Clear or Invert a rectangular portion of a scratchpad bitmap"
  377. The rectangular region of
  378. .I scratchpad
  379. bitmap 
  380. .Fi to ,
  381. starting at
  382. .Fi x_dst , y_dst
  383. of extent
  384. .Fi wide
  385. by
  386. .Fi high ,
  387. is
  388. set, cleared or inverted
  389. as determined by the previous call to 
  390. .Fr m_func
  391. \&.
  392. If the destination
  393. .Fi to
  394. does not exist, it is created with the dimensions
  395. .Fi wide
  396. by
  397. .Fi high .
  398. .Fe
  399. .Fh m_broadcast string 
  400. .Fs m_broadcast 12 "Broadcast a message to all listeners"
  401. The message
  402. .Fi string
  403. is broadcast to all windows that are
  404. .I listen ing.
  405. .I Listen ing
  406. is turned on by setting the 
  407. .SM
  408. .Fi ACCEPT
  409. .LG
  410. event for a window.
  411. (See
  412. .Fr m_setevent
  413. ).
  414. Messages can only be sent to windows whose controlling
  415. terminals have general write permission disabled (i.e. mode 0400)
  416. as a security measure to prevent malicious foreign processes from sending
  417. .I shell s
  418. messages that get interpreted and executed as commands.
  419. .Fe
  420. .Fh m_circle x_dst  y_dst  radius 
  421. .Fs m_circle 4 "Draw a circle"
  422. A circle of radius
  423. .Fi radius
  424. is drawn, centered at
  425. .Fi x_dst , y_dst .
  426. The points at the edge of the circle are
  427. set, cleared or inverted
  428. depending upon the last call to
  429. .Fr m_func
  430. \&.
  431. Circles are never scaled,
  432. they always appear as circles on the display, regardless of the window shape.
  433. The
  434. .Fi radius
  435. is scaled based upon the average
  436. .Fi width
  437. and
  438. .Fi height
  439. of the window.
  440. Use
  441. .Fr m_ellipse
  442. to obtain a scaled circle.
  443. .Fe
  444. .Fh m_clear
  445. .Fs m_clear 3 "Clear the window"
  446. The current
  447. .I "text region"
  448. is cleared, and the character cursor is moved to position
  449. .Fr "" 0 0
  450. \&.
  451. If no
  452. .I "text region"
  453. is set,
  454. .Fr m_clear
  455.  clears the entire window.
  456. .Fe
  457. .Fh m_cleareol
  458. .Fs m_cleareol 3 "Clear to the end of the line"
  459. All of the characters on the current line, starting with the 
  460. current character to the end of the
  461. .I "text region" ,
  462. are cleared.
  463. If no
  464. .I "text region"
  465. is set,
  466. .Fr m_cleareol
  467.  clears to the edge of the window.
  468. .Fe
  469. .Fh m_cleareos
  470. .Fs m_cleareos 3 "Clear to the end of the window"
  471. All of the characters in the current
  472. .I "text region" ,
  473. from the 
  474. current character to the end
  475. of the
  476. .I "text region" ,
  477. are cleared.
  478. If no
  479. .I "text region"
  480. is set,
  481. .Fr m_clear
  482.  clears to the end of the window.
  483. .Fe
  484. .Fh m_clearevent n 
  485. .Fs m_clearevent 9 "Clear an event"
  486. Event
  487. .Fi n
  488. is cleared.
  489. The integer
  490. .Fi n
  491. is one of:
  492. .Fi ACCEPT ,
  493. .Fi ACTIVATE ,
  494. .Fi BUTTON_1 ,
  495. .Fi BUTTON_1U ,
  496. .Fi BUTTON_2 ,
  497. .Fi BUTTON_2U ,
  498. .Fi COVERED ,
  499. .Fi DEACTIVATE ,
  500. .Fi DESTROY ,
  501. .Fi MOVE ,
  502. .Fi NOTIFY ,
  503. .Fi PASTE ,
  504. .Fi REDRAW ,
  505. .Fi RESHAPE ,
  506. .Fi SNARFED,
  507. .Fi STACK ,
  508. or
  509. .Fi UNCOVERED .
  510. See
  511. .Fr m_setevent
  512.  for a description of the events.
  513. .Fe
  514. .Fh m_clearmenu n 
  515. .Fs m_clearmenu 8 "Clear a menu"
  516. If menu
  517. .Fi n
  518. exists,
  519. it is cleared.
  520. .Fe
  521. .Fh m_clearmode mode 
  522. .Fs m_clearmode 6 "Reset a window mode"
  523. Clear one of the following window modes.
  524. Except where noted, these are the default settings.
  525. The mode settings are more fully explained in
  526. .Fr m_setmode
  527. \&.
  528. .RS
  529. .IP \fBM_ABS\fP 0.5i
  530. .br
  531. .I Absolute
  532. window coordinate mode is turned off.
  533. The window is now in
  534. .I relative
  535. window coordinates. 
  536. All window coordinates range from
  537. .Fr "" 0 0
  538.  in the upper left corner to
  539. .Fr "" 999 999
  540.  at the lower right.
  541. .IP \fBM_ACTIVATE\fP 0.5i
  542. .br
  543. Bury the window. Unlike the other window modes, 
  544. .I bury 
  545. has no state associated with it, just a one time action.
  546. A window is buried by visually pushing it to the 
  547. bottom of the display;
  548. any window intersecting it will appear in front of it.
  549. .IP \fBM_AUTOEXPOSE\fP 0.5i
  550. .br
  551. Do not automatically activate the window the next time it
  552. receives output.
  553. .IP \fBM_BACKGROUND\fP 0.5i
  554. .br
  555. \*M does not permit the window to update if it is partially or totally obscured.
  556. Data destined for the window is held until the window is uncovered,
  557. or
  558. .SM
  559. .B M_BACKGROUND
  560. .LG
  561. is turned on.
  562. .IP \fBM_NOINPUT\fP 0.5i
  563. .br
  564. Accept keyboard input if the window is active.
  565. .IP \fBM_NOWRAP\fP 0.5i
  566. .br
  567. Wrap the character cursor to the next line when it reaches the right margin
  568. of the
  569. .I "text region" .
  570. .IP \fBM_OVERSTRIKE\fP 0.5i
  571. .br
  572. Do not overstrike characters.
  573. Text is copied to the window as if
  574. .Fr m_func B_SRC
  575.  is set.
  576. .IP \fBM_SNARFHARD\fP 0.5i
  577. .br
  578. The system
  579. .I cut
  580. function fails if any errors are found. 
  581. This is indicated by flashing the window.
  582. The contents of the
  583. .I cut
  584. buffer are left undisturbed.
  585. Normally this only happens if some process unknown to \*M scribbles into
  586. the region being cut.
  587. .IP \fBM_SNARFLINES\fP 0.5i
  588. .br
  589. Sets
  590. the system
  591. .I cut
  592. function to cut individual characters,
  593. instead of entire lines only.
  594. .IP \fBM_SNARFTABS\fP 0.5i
  595. .br
  596. The system
  597. .I cut
  598. function cuts text exactly as it appears on the window.
  599. All interior white space is converted to 
  600. .I space s,
  601. all trailing white space is treated as a
  602. .I "new line" .
  603. .IP \fBM_STACK\fP 0.5i
  604. .br
  605. Event stacking is turned off.
  606. Event strings are only returned for the current window context and
  607. not for any contexts stacked with
  608. .Fr m_push
  609. \&.
  610. .IP \fBM_STANDOUT\fP 0.5i
  611. .br
  612. Characters are drawn in black with a white background.
  613. .IP \fBM_WOB\fP 0.5i
  614. .br
  615. The window foreground color is set to
  616. .I black ,
  617. and the window background is set color to
  618. .I white .
  619. .IP \fBM_DUPKEY\fP 0.5i
  620. .br
  621. The keyboard escape character is turned off.
  622. This mode is turned on by calling
  623. .Fr m_dupkey
  624. \&.
  625. There is no corresponding call to
  626. .Fr m_setmode
  627. \&.
  628. .RE
  629. .Fe
  630. .Fh m_deletechar
  631. .Fs m_deletechar 3 "Delete a character"
  632. The character at the cursor position is deleted.
  633. Any characters on the line to the right of the cursor are shifted
  634. left one character position.
  635. The last character on the line is set to a
  636. .I space .
  637. .Fe
  638. .Fh m_deletechars n 
  639. .Fs m_deletechars 3 "Delete characters"
  640. The next
  641. .Fi n
  642. characters are deleted, starting at the character cursor position.
  643. Any characters on the line to the right of the cursor are shifted
  644. left 
  645. .Fi n
  646. character positions.
  647. The last 
  648. .Fi n
  649. characters on the line are set to 
  650. .I space .
  651. .Fe
  652. .Fh m_deleteline
  653. .Fs m_deleteline 3 "Delete a line"
  654. The line at the cursor position is deleted.
  655. Any lines below the cursor are shifted
  656. up one line.
  657. The last line is cleared.
  658. .Fe
  659. .Fh m_deletelines n 
  660. .Fs m_deletelines 3 "Delete lines"
  661. The next
  662. .Fi n
  663. lines starting at the cursor position and toward the bottom 
  664. of the window are deleted.
  665. Any lines below the deleted ones are shifted
  666. up 
  667. .Fi n
  668. lines.
  669. The last 
  670. .Fi n
  671. lines are cleared.
  672. It is more efficient to make one call to
  673. .Fr m_deletelines
  674.  than to call
  675. .Fr m_deleteline
  676. .Fi n
  677. times.
  678. .Fe
  679. .Fh m_destroywin n 
  680. .Fs m_destroywin 11 "Destroy an alternate window"
  681. Destroy alternate window
  682. .Fi  n ,
  683. created by calling
  684. .Fr m_newwin
  685. \&.
  686. If output is currently directed to this window,
  687. it is automatically re-directed to the
  688. .I main
  689. window.
  690. See also
  691. .Fr m_selectwin
  692. \&.
  693. .Fe
  694. .Fh m_down n 
  695. .Fs m_down 13 "Move character cursor down by tenths of a character height"
  696. Move the character cursor down 
  697. .Fi n
  698. tenths of a character height.  This may cause the window to scroll.
  699. See also
  700. .Fr m_left
  701. .Fr m_right
  702. and
  703. .Fr  m_up
  704. \&.
  705. .Fe
  706. .Fh m_draw x  y 
  707. .Fs m_draw 4 "Draw a line from the graphics point"
  708. Draw a line from current
  709. .I "graphics point"
  710. to
  711. .Fr ""  x y
  712. \&.
  713. The macro
  714. .Fr m_go
  715.  is used to move the
  716. .I "graphics point" .
  717. The
  718. .I "graphics point"
  719. is left at
  720. .Fr "" x y
  721. , the end point of the line.
  722. .Fe
  723. .Fh m_dupkey char 
  724. .Fs m_dupkey 6 "Turn on keyboard escape mechanism"
  725. Every time the character
  726. .Fi char
  727. is typed at the keyboard for this window,
  728. it is sent to the client program twice.
  729. This enables clients to reliably distinguish
  730. keyboard input from that generated by menu selections or events.
  731. The client begins every
  732. .I event
  733. and
  734. .I menu
  735. string with a two character code
  736. whose first character is
  737. .Fi char
  738. and whose second character is anything but
  739. .Fi char
  740. or
  741. .Fi space .
  742. When this mode is set, all replies to \*M queries, as with 
  743. .Fr m_getinfo
  744. are prepended by the two character sequence
  745. .Fi char
  746. followed by
  747. .Fi space .
  748. For multiline requests, such as
  749. .Fr M_getinfo G_ALL
  750. only the first line of the reply is affected.
  751. These two characters are also prepended to all other \*M commands that
  752. return a character string to the client program, such as 
  753. .Fr m_newwin
  754. or
  755. .Fr m_bitfromfile
  756. \&.
  757. .Fe
  758. .Fh m_ellipse x  y  radius1 radius2 
  759. .Fs m_ellipse 4 "Draw an ellipse"
  760. Draw an ellipse centered at
  761. .Fr "" x y
  762. \&.
  763. The values for
  764. .Fi radius1
  765. and
  766. .Fi radius2
  767. are the major and minor axis radii.
  768. The ellipse is either
  769. set, cleared or inverted
  770. determined by the last call to
  771. .Fr m_func
  772. \&.
  773. The values for
  774. .Fi radius1
  775. and
  776. .Fi radius2
  777. are scaled based upon the average
  778. width and height of the window.
  779. .Fe
  780. .Fh m_ellipseto to  x  y  radius1 radius2 
  781. .Fs m_ellipseto 4 "Draw an ellipse on a scratchpad bitmap"
  782. Draw an ellipse on scratchpad bitmap
  783. .Fi to
  784. centered at
  785. .Fr "" x y
  786.  where
  787. .Fi radius1 , radius2
  788. are the major and minor axis radii.
  789. The ellipse is either
  790. set, cleared or inverted
  791. determined by the last call to
  792. .Fr m_func
  793. \&.
  794. The values for
  795. .Fi radius1
  796. and
  797. .Fi radius2
  798. are scaled based upon the average
  799. .Fi width
  800. and
  801. .Fi height
  802. of the window.
  803. If the offscreen bitmap
  804. .Fi to
  805. does not exist, 
  806. this call is ignored.
  807. .Fe
  808. .Fh m_fastdraw x y count data
  809. .Fs m_fastdraw 4 "Draw a group of fast vectors"
  810. The next
  811. .Fi count
  812. bytes of
  813. .Fi data
  814. are sent to \*M are to be interpreted as lines drawn in
  815. .I "fast draw"
  816. mode,
  817. starting at
  818. .Fr "" x y
  819. \&.
  820. .I "Fast draw"
  821. mode permits the rapid drawing of short vectors
  822. by encoding an 
  823. .I x,y
  824. displacement location in a single byte.
  825. The 
  826. .I x
  827. coordinate is contained in the most significant
  828. 4 bits, the
  829. .I y
  830. coordinate in the least significant 4 bits.
  831. Values for
  832. .I x
  833. and
  834. .I y
  835. represent displacements from the previous location, and
  836. range from +7 to -8.
  837. A 7 is coded as 
  838. .B 0xff ,
  839. a -8 as
  840. .B 0x00 .
  841. If both 
  842. .I x
  843. and
  844. .I y
  845. are zero (i.e.
  846. .B 0x8080 ).
  847. The next coordinate is taken to be a
  848. .I move
  849. instead of a
  850. .I draw.
  851. An eight bit channel between \*M and the client program is required for
  852. .I "fast draw"
  853. mode.
  854. See also
  855. .Fr m_rfastdraw
  856. \&.
  857. .fe
  858. .Fh m_fcolor color
  859. .Fs m_fcolor 14 "Set the text foreground color"
  860. The foreground color for text operations is set to
  861. .Fi color
  862. ,
  863. which is an index into the color lookup table.
  864. This command is ignored on a monochrome display.
  865. See also 
  866. .Fr m_bcolor
  867. and
  868. .Fr m_linecolor
  869. \&.
  870. .Fe
  871. .Fh m_flush
  872. .Fs m_flush 1 "Flush any outpout pending for the window"
  873. Flush the \*M output buffer.
  874. This is equivalent to the stdio function
  875. .B fflush()
  876. and is needed only when the
  877. .SM
  878. .Fi M_FLUSH
  879. .LG
  880. flag is
  881. .I not
  882. specified in the call to 
  883. .Fr m_setup
  884. \&.
  885. .Fe
  886.